﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
		<!-- ace styles -->
<link href="static/css/bootstrap.min.css" rel="stylesheet" />
<script src='static/js/jquery-2.1.3.min.js'></script>
<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/js/layer.js"></script>
<script type="text/javascript" src="plugins/jquery.form.js"></script>
<link rel="stylesheet" href="static/css/layui.css" media="all">
</head>
<script type="text/javascript">
	$(top.hangge());

	$(function(){
		 $(".btnCommit").click(function(){
			 //正则表达式校验正整数
			 var reg=/^[1-9]+\d*$/;
			 if(!reg.test($("[name='S1Max']").val()) ||
				!reg.test($("[name='S2Min']").val())  ||
				!reg.test($("[name='S2Max']").val())  ||
				!reg.test($("[name='S3']").val())
			 	){
				 layer.alert("请输入正确数据!");
				 return;
			 }
			 //Ajax的表单提交
			 $("#pageForm").ajaxSubmit(function(data){
				if(data.success){
					layer.alert(data.msg, function(){
						//刷新表单
						window.location.reload();
					});       
				}else{
					layer.alert(data.msg);
				}
			});
			 
		 })
		
		
	})
</script>

<body>

<div style="margin-left: 20px;margin-top: 20px">
	系统管理 > 参数管理
	<hr>
	<form action="<%=basePath%>parameter/update" method="post" name="pageForm" id="pageForm">
		<table>
			<tr>
				<td style="padding-left: 10px;">今日现金S1阶段/组：逾期1天——逾期<input type="text" name="S1Max" style="width: 50px">天</td>
				
				<td style="padding-left: 50px">今日现金S2阶段/组：逾期<input type="text" name="S2Min" style="width: 50px">天——逾期<input type="text" name="S2Max" style="width: 50px">天</td>
			</tr>
			<tr>
				<td>今日现金S2+阶段/组：逾期大于<input type="text" name="S3" style="width: 50px">天</td>
				<td></td>
			</tr>
		</table>
		<br>
		<input  type="button" class="btn btn-primary btnCommit" value="确认">
	</form>
</div>
</body>
</html>

